Home:ALL Converter>VS show alot of errors (E1696, E0020) and warnings (C26451, C4754) with a new project

VS show alot of errors (E1696, E0020) and warnings (C26451, C4754) with a new project

Ask Time:2020-01-29T04:39:55         Author:moshe banano

Json Formatter

When I starts a new project (Blank App (C++/WinRT)) on Windows10 1909 @ VS2019(up to date) its shows up a lot of errors as if the extension wasn't installed. But after trying to compile and run its works - so why do I get the errors and how can I solve this? screenshot


Edit: I have fond a solution for that. its turns out that the project was needed an additional include directory:

under the project properties->C/C++->General->[Additional Include Directory] I added the winRT folder: C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\cppwinrt screenshot2

and that's it now there's no errors (correction - after creating new project its still have the same errors)


edit2: Update: I installed the last windows 10 SDK and was still getting the seam errors. Than I installed a package via cmd with the following command: D:\vcpkg> vcpkg install cppwinrt:x86-windows

after this was done it seem to work now


edit3: I'm sorry for the annoying newcomer questions... its looks like I have another problem now with my project in the packages.config file is says that the package is not declared with the following warning packages.config pic

thanks for any help in advance.


(edit4) I followed this thread: nuget 'packages' element is not declared warning and that's it, now all I have to do is to learn how to code :D

Author:moshe banano,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/59956675/vs-show-alot-of-errors-e1696-e0020-and-warnings-c26451-c4754-with-a-new-pr
yy